<?php
/**
 * Created by JetBrains PhpStorm.
 * User: xami
 * Date: 12-8-17
 * Time: 下午11:28
 * To change this template use File | Settings | File Templates.
 */

$this->menu=array(
    array('label'=>'创建文章', 'url'=>array('/user/article/create')),
);

$this->widget('zii.widgets.grid.CGridView', array(
    'id'=>'article-grid',
    'dataProvider'=>$model->with('user')->search(),
    'filter'=>$model,
    'columns'=>array(
        'aid',
        'user.username',
        'cate.name',
        array(
            'name'=>'audit',
            'value'=>'$data->audit==1?"通过":($data->audit==-1?"未通过":"未审核")',
        ),
        'title',
        //            'excerpt',
        //            'content',
        'enabled',
        'grade',
        'clicknumber',
        'createtime',
        'updatetime',
        array(
            'class'=>'CButtonColumn',
            'header'=>'操作',
        ),
    ),
));



